package com.hk.service;

import com.hk.dao.UserRepository;
import com.hk.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl {

    @Autowired
    private UserRepository userRepository;

    public User findOneUser(String loginName,String password){
       return userRepository.findUserByLoginNameAndPassword(loginName,password);
    }

    public User saveOneUser(User user) {
        return  userRepository.save(user);
    }
}
